/**
 * Created by Brant on 2016/12/28.
 * 案件动态
 */
module.exports = function ($http, httpservice, $q) {
    var caseBarDetailDongService = {};


    /**
     * 案件动态
     * @param caseId 案件ID
     * @param pageNum 页码
     * @param pageSize 每页数
     */
    caseBarDetailDongService.caseMessage = function (caseId, pageNum, pageSize) {

        var params = {"caseId": caseId, "pageNum": pageNum, "pageSize": pageSize};

        var deferred = $q.defer();
        $http({
            method: 'POST',
            url: httpservice.caseMessageUrl,
            data: params,
            headers: {'Content-Type':'application/json'}
        }).then(function successCallback(response) {
            deferred.resolve(response.data);
        }, function errorCallback(response) {
            deferred.reject(response);
        });
        return deferred.promise;
    };

    return caseBarDetailDongService;

};
